<template>
	<!-- 发布需求 -->
	<view class="ReleaseRequirements public">
		<view class="empty"></view>
		<view class="main">
			<view class="main-item" v-for="item in arr" :key="item.id" @click="JumpPage(item.id)">
				<view class="main-item-image">
					<image :src="item.image" mode=""></image>
				</view>
				<view class="main-item-main">
					<view class="main-item-main-title">
						{{item.title}}
					</view>
					<view class="main-item-main-notes">
						{{item.notes}}
					</view>
				</view>
			</view>
		</view>
	</view>
</template>

<script>
	export default {
		data(){
			return {
				arr: [
					{id:1,image:require('../../static/xiaoyutong/PartTimeJobSearch.png'),title:'兼职求职',notes:'及时快速沟通 回复率100%'},
					{id:2,image:require('../../static/xiaoyutong/RevelationOfSearchingForObjects.png'),title:'寻物启事',notes:'发布需求 大家帮忙找'},
					{id:3,image:require('../../static/xiaoyutong/secondHand.png'),title:'二手市场',notes:'低价淘逆想淘 转你闲置'},
					{id:4,image:require('../../static/xiaoyutong/waste.png'),title:'废品回收',notes:'为环保出一份力'},
				]
			}
		},
		methods: {
			JumpPage(id){
				if(id == 1) {
					uni.navigateTo({
						url:'../../pages_xiaoyutong/PartTimeJobSearch/PartTimeJobSearch'
					})
				} else if (id == 2) {
					uni.navigateTo({
						url:'../../pages_xiaoyutong/Lost/Lost'
					})
				} else if (id == 3) {
					uni.navigateTo({
						url:'../../pages_xiaoyutong/SecondHandMarket/SecondHandMarket'
					})
				} else if (id == 4) {
					uni.navigateTo({
						url:'../../pages_xiaoyutong/wasteRecovery/wasteRecovery'
					})
				}
			}
		}
	}
</script>

<style lang="less" scoped>
	.ReleaseRequirements {
		background: #F9F9F9;
		.empty {
			height: 20rpx;
		}
		.main {
			.main-item {
				display: flex;
				align-items: center;
				width: 702rpx;
				height: 242rpx;
				background: #FFFFFF;
				box-shadow: 0rpx 3rpx 10rpx 0rpx rgba(122,122,122,0.14);
				border-radius: 10rpx;
				margin: auto;
				margin-bottom: 17rpx;
				.main-item-image {
					padding: 0 39rpx 0 43rpx;
					image {
						width: 106rpx;
						height: 106rpx;
					}
				}
				.main-item-main {
					.main-item-main-title {
						font-size: 40rpx;
						font-family: PingFang SC;
						font-weight: 400;
					}
					
					.main-item-main-notes {
						font-size: 28rpx;
						font-family: PingFang SC;
						font-weight: 400;
						color: #888888;
					}
				}
			}
			.main-item:first-child .main-item-main-title {
				color: #F14500;
			}
			.main-item:nth-child(2) .main-item-main-title {
				color: #D53E1C;
			}
			.main-item:nth-child(3) .main-item-main-title {
				color: #EDA321;
			}
			.main-item:last-child .main-item-main-title {
				color: #22D07C;
			}
		}
	}
</style>